Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: external tools producing duplicate keys #440

Merged
merged 1 commit into from
Nov 6, 2024
Merged

fix: external tools producing duplicate keys #440

merged 1 commit into from
Nov 6, 2024

Conversation

miki725
Copy link
Contributor

@miki725 miki725 commented Nov 5, 2024

Issue

SBOM key was reported both on report and chalk mark level:

{
  "_CHALKS": {"SBOM": {...}},
  "SBOM": {...}
}

Description

Some tools work on context directories (e.g. sbom) and for non-fs artifacts (e.g. docker image), sbom tool would run both during host chalk time as well as artifact chalk time collections. As both would collect its output for the same path input, it would produce duplicate output in both report and chalk mark levels.

Now any tool can run at most once and any future attempts for the same path are skipped which removes duplicate keys.

Testing

➜ make tests args="test_plugins.py::test_syft_docker --logs"

@miki725 miki725 marked this pull request as ready for review November 5, 2024 18:33
@miki725 miki725 requested a review from viega as a code owner November 5, 2024 18:33
Some tools work on context directories (e.g. sbom) and for non-fs
artifacts (e.g. docker image), sbom tool would run both during host
chalk time as well as artifact chalk time collections. As both would
collect its output for the same path input, it would produce duplicate
output in both report and chalk mark levels.

Now any tool can run at most once and any future attempts for the same
path are skipped which removes duplicate keys.
@miki725 miki725 merged commit 7d7ec11 into main Nov 6, 2024
4 checks passed
@miki725 miki725 deleted the sc-2801 branch November 6, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants